package main.leetcode.offer.secondround.from03to50;

/** 10-II.青蛙跳台阶问题 */
public class day10II {
    public int numWays(int n) {
        int a = 1;
        int b = 1;
        int res;
        for (int i = 1; i < n; ++i) {
            res = (a + b) % 1000000007;
            a = b;
            b = res;
        }
        return b;
    }
}
